<extend name="Layout::index"/>
<block name="title"><title>放映场次管理</title></block>
<!--右内容区域-->
<block name="content">
    <div class="layout-content">
        <div class="mt15 pr15">
        <a data-toggle="modal" style="margin-top:20px" data-target="#myModal5"  class="btn btn-sm btn-success pull-right">添加场次</a>
        </div>
        <div class="page-title">放映场次管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>放映场次列表</span></li>
            </ul>
            <div class="clearfix"></div>
        </div>
        <!--content-main start-->
        <?php if(!empty($_SESSION['ts'])): ?>
        <div class="ui-tips bg-info" id="error">
            <span class=" icon glyphicon glyphicon-info-sign">
                <?php echo $_SESSION['ts'];
                 unset($_SESSION['ts']);
                 ?>
            </span>
        </div>
        <?php  endif;  ?>
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    </form>
                    <table class="table table-hover mt15">
                        <thead>
                        <tr>
                            <button type="button" class="btn btn-default btn-lg">（{$movie}）cinema</button>
                        </tr>
                        <tr>
                            <th>场次ID</th>
                            <th>电影图</th>
                            <th>电影名</th>
                            <th>放映厅</th>
                            <th>放映时间</th>
                            <th>单价</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <notempty name="season">
                            <foreach name="season" item="val">
                                <tr class="pages">
                                    <td style="line-height:60px">
                                        {$val['cid']}
                                    </td>
                                    <td>
                                        <img width="100px" src="__PUBLIC__/upload/{$val.mc}">
                                    </td>
                                    <td style="line-height:60px">
                                        {$val.mname}
                                    </td>
                                    <td style="line-height:60px">
                                        {$val.rname}
                                    </td>
                                    <td style="line-height:60px">
                                       <?php echo date("Y-m-d H:i",$val['ctime']) ?> 
                                    </td>
                                    <td style="line-height:60px">
                                        {$val.cp}
                                    </td>
                                    <th style="line-height:60px">
                                        <a href="{:U('Index/create',['id'=>$val['cid'],'cp'=>$val['cp']])}">修改</a>
                                    </th>
                                </tr>
                            </foreach>
                        <else />
                            <tr>
                                <th colspan="7"><button type="button" class="btn btn-default btn-lg" style="margin-left:310px;border:none">还没有场次，请前去添加</button></th>
                            </tr>
                        </notempty>
                        </tbody>
                    </table>
                    <div class="pull-right">
                                 <span class="pagination">
                                        {$page}
                                 </span>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <!--content-main end-->
    </div>
    <!--右侧内容结束-->
    <div class="modal fade" id="myModal5" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">season</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" action="{:U('Index/add')}" method="post">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电影</label>
                            <div class="col-sm-10">
                                <select class="form-control"  name="name">
                                    <foreach name="movies" item="val">
                                    <option selected value="{$val['id']}">{$val['name']}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">放映厅</label>
                            <div class="col-sm-10">
                                <select class="form-control"  name="fyt">
                                    <foreach name="room" item="val">
                                    <option value="{$val['id']}">{$val['name']}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">放映时间</label>
                            <div class="col-sm-10">
                               <select name="timey">
                                   <option value="2016">2016</option>
                               </select>
                               <select name="timem">
                                   <for start="1" end="13">
                                   <option value="{$i}" >{$i}月</option>
                                   </for>
                               </select>
                               <select name="timed">
                                   <for start="1" end="32">
                                   <option value="{$i}">{$i}日</option>
                                   </for>
                               </select>
                               <select name="timeh">
                                   <for start="1" end="25">
                                   <option value="{$i}">{$i}时</option>
                                   </for>
                               </select>
                               <select name="timei">
                                   <for start="1" end="61">
                                   <option value="{$i}">{$i}分</option>
                                   </for>
                               </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">单价</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  name="price">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">添加</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>
